using System;
using UnityEngine;

[Serializable]
public class loadarena : MonoBehaviour
{
	public AudioClip clip;

	public Color pressed;

	public Color unpressed;

	public string arenatoload;

	public Camera mainCamera;

	public Collider no;

	public loadarena()
	{
		arenatoload = "arena1";
	}

	public void Update()
	{
		if (Input.GetMouseButtonUp(0))
		{
			st();
		}
		if (Input.GetMouseButtonDown(0))
		{
			RaycastHit hitInfo = default(RaycastHit);
			if (Physics.Raycast(mainCamera.ScreenPointToRay(UnityEngine.Input.mousePosition), out hitInfo, 100f) && hitInfo.collider.name == "No")
			{
				AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
				no.GetComponent<Renderer>().material.color = pressed;
				no.GetComponent<Renderer>().material.SetColor("_SpecColor", pressed);
				UnityEngine.SceneManagement.SceneManager.LoadScene(arenatoload);
			}
		}
	}

	public void st()
	{
		no.GetComponent<Renderer>().material.color = unpressed;
		no.GetComponent<Renderer>().material.SetColor("_SpecColor", Color.white);
	}

	public void Main()
	{
	}
}
